//
//  TGMBasePullToRefreshHandler.m
//  TravelGuideMdd
//
//  Created by HanFeng on 3/12/14.
//  Copyright (c) 2014 mafengwo.com. All rights reserved.
//

#import "TGMBasePullToRefreshHandler.h"
#import "TGMModel2ScrollViewAdapter.h"

@implementation TGMBasePullToRefreshHandler

- (void)loadResources
{
    
}

- (BOOL)stopAnimationManually:(BOOL)success
{
    return NO;
}

#pragma mark - Pull to Refresh (TGMPullToRefreshDelegate)

- (Class)tgm_classForPullToRefreshView:(UIScrollView *)scrollView
{
    return [TGMDefaultActivityPullToRefreshView class];
}

- (Class)tgm_classForLoadMoreView:(UIScrollView *)scrollView
{
    return nil;
}

- (void)tgm_ScrollViewDidPullToRefresh:(UIScrollView *)scrollView byUser:(BOOL)byUser
{
//    // 事件纪录
//    [MFWClick event:MFWClick_EventCode_pull_to_refresh trigger:nil publicAttributesBlock:^NSDictionary *{
//        return @{
//                 MFWClick_EventKey_ptr_type:@"base",
//                 MFWClick_EventKey_ptr_page:[self.viewAdapter.contextViewController pageName]?:@"",
//                 MFWClick_EventKey_ptr_by_user:[@(byUser) stringValue],
//                 };
//    } privateAttributesBlock:^NSDictionary *{
//        return @{
//                 
//                 };
//    }];
    
    [self.viewAdapter requestRefresh];
}

- (void)tgm_ScrollViewDidLoadMore:(UIScrollView *)scrollView
{
    
}

- (UIEdgeInsets)tgm_ScrollViewExpectedContentInset:(UIScrollView *)scrollView
{
    return [self.viewAdapter contextScrollViewContentInset];
}

@end
